{% extends "blog/blog_base.html" %}
{% load blog_extras prefab_tags comment_utils %}
{% load markup i18n %}

{% comment %} 
    Copyright (c) 2006-2007, PreFab Software Inc.
    Copyright (c) 2006, Andrew Gwozdziewycz apgwoz@gmail.com
    Copyright (c) 2008, aaloy - apsl.net
    All rights reserved. 
{% endcomment %}

{% block "contentbody" %}
<h2>{% trans "Resultats de la cerca" %}</h2>
<p>Articles que contenen {% for term in query %}
    {% if not forloop.last %}
    '{{ term }}',
    {% else %}
    {% if forloop.last %}
    '{{ term }}'
    {% endif %}{% endif %}
    {% endfor %}
</p>
{% if object_list %}
<hr/>
<br/>
{% for p in object_list %}
<div class="column1-unit">
    <h1 class="pagetitle"><a href="{{ p.get_absolute_url }}" title="{{ p.headline }}" class='menu{% if not p.current_post %}_content{% endif %}{% if p.current_post %}_current{% endif %}'>{{ p.headline }}</a></h4>
    <h3>
        {% trans "Escrit per " %}<a href='{% BLOG_ROOT %}user/{{ p.user }}/'>{{ p.user|title }}</a>{% trans " a " %}<a href='{% BLOG_ROOT %}{{ p.pub_date|date:"Y/m/d" }}/'>{{ p.pub_date|date:"d" }}</a> de <a href='{% BLOG_ROOT %}{{ p.pub_date|date:"Y/m" }}/'>{{ p.pub_date|date:"F" }}</a> , <a href='{% BLOG_ROOT %}{{ p.pub_date|date:"Y" }}/'>{{ p.pub_date|date:"Y" }}</a> a les {{ p.pub_date|time }}    {% if user.is_authenticated %}&nbsp; <a href="/tools/entry/{{p.id}}/">{% trans "Editar" %}</a>{% endif %}
    </h3>
    {% autoescape off %}
    <p class ="contingut">
        {{ p.body}}
    </p>
    {% endautoescape %}
    <p class="details">
        {% get_public_comment_count for blog.entry p.id as comment_count %}
        {% get_public_trackback_count for blog.entry p.id as trackback_count %}
        <a href='{{ p.get_absolute_url }}#comments' >{{ comment_count }}{% trans " commentari" %}{{ comment_count|pluralize }}</a>,
        <a href='{{ p.get_absolute_url }}#trackbacks'>{{ trackback_count }}{% trans " trackback" %}{{ trackback_count|pluralize }}</a> (<a href="{{ p.get_absolute_url }}trackback/">{% trans "URL" %}
		</a>)
        {% for t in object.get_tags %}{% if forloop.first %},&nbsp;<a href='{% BLOG_ROOT %}tag/' class='blog_sm'>{% trans "Tags:"%}</a>{% endif %} 
        <a href="{{ t.get_absolute_url }}" title="{% trans  'Entrades classificades com' %} '{{ t }}'">{{ t }}
        </a>
        {% endfor %} 
    </p>
    </div>
{% endfor %}
{% else %}
<p>{% trans "No s'han trobat entrades amb els termes de la cerca" %}</p>
{% endif %}
<p>{% trans "Temps de la cerca" %}: {{time|floatformat:4}} {% trans "segons" %} </p>
{% endblock "contentbody" %}

{% block "taglist" %}
    {% include "blog/includes/popular_tags.html" %}
{% endblock %}
